package abstractdemo01;

public abstract class Person {
    public abstract void work();
    public Person() {
    }
// 当创建子类对象的时候,给父类的属性赋值的
    public Person(String name, int age) {
        this.name = name;
        this.age = age;
    }



    private  String name;
    private  int age;



    public String getName() {
        return name;
    }


    public void setName(String name) {
        this.name = name;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }


}
